﻿using DTOs;
using OA.IBLL;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;

namespace OA.WebAPI.Controllers
{
    public class UserController : ApiController
    {
        public ISysPersonService PersonService { get; set; }

      
        public async Task<IHttpActionResult> Get()
        {
            var list= await PersonService.GetList(x=>true)
                .Select(x=>new { x.Id,x.Name,x.LoginState})
                .ToListAsync();
            return Json(new CommonResult("", list));
        }
    }
}
